public class Operator{
    public static int Add(int a, int b){
        return a+b;
    }
    public static Fraction Add(Fraction a, Fraction b){
        int fenzi = a.getFenmu() * b.getFenzi() + a.getFenzi() * b.getFenmu(),fenmu = a.getFenmu() * b.getFenmu();
        Fraction c = new Fraction(fenzi, fenmu);
        return c;
    }
    public static int Minus(int a, int b){
        return a - b;
    }
    public static Fraction Minus(Fraction a, Fraction b){
        int fenzi = a.getFenzi() * b.getFenmu() - a.getFenmu() * b.getFenzi();
        int fenmu = a.getFenmu() * b.getFenmu();
        Fraction c = new Fraction(fenzi, fenmu);
        return c;
    }
    public static int Multi(int a, int b){
        return a * b;
    }
    public static Fraction Multi(Fraction a, Fraction b){
        int fenzi = a.getFenzi() * b.getFenzi();
        int fenmu = a.getFenmu() * b.getFenmu();
        Fraction c = new Fraction(fenzi, fenmu);
        return c;
    }
    public static int Divide(int a, int b){
        return a  / b;
    }
    public static Fraction Divide(Fraction a, Fraction b){
        int fenzi = a.getFenzi() * b.getFenmu();
        int fenmu = a.getFenmu() * b.getFenzi();
        Fraction c = new Fraction(fenzi, fenmu);
        return c;
    }
}
